import 'package:flutter/material.dart';

import '../../../data/model/chat_message.dart';


class ImgMessage extends StatelessWidget {
  const ImgMessage({
    Key? key,
    required this.message,
  }) : super(key: key);

  final ChatMessage message;

  @override
  Widget build(BuildContext context) {
    return SizedBox(
        width: MediaQuery.of(context).size.width * 0.45,
        child: AspectRatio(
          aspectRatio: 1.6,
          child: Stack(
            alignment: Alignment.center,
            children: [
              ClipRRect(
                borderRadius: BorderRadius.circular(8),
                child: Image.network(message.text),
              ),
            ],
          ),
        ));
  }
}
